package cn.xiaopengstack.domain.activity.model.valobj;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author jiangyangang
 */
@Getter
@AllArgsConstructor
public enum DiscountTypeEnum {

    BASE(0, "基础折扣"),
    USER_TAG(1, "人群折扣"),
    ;

    private final Integer code;

    private final String info;

    public static DiscountTypeEnum get(Integer code) {
        switch (code) {
            case 0:
                return BASE;
            case 1:
                return USER_TAG;
            default:
                throw new RuntimeException("err code!");
        }
    }

}
